From d3602e826b81f11058e37e1981ce65a8ed6a2032 Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Thu, 5 Oct 2006 19:13:52 +0100 Subject: [PATCH] [XEND] Fix XenAPI Host interface so that get_record works. Signed-off-by: Alastair Tse --- tools/python/xen/xend/XendAPI.py | 4 ++-- tools/python/xen/xend/XendDomain.py | 2 +- tools/python/xen/xend/XendNode.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index f13a9e0835..cc78cff9dd 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -382,8 +382,8 @@ class XendAPI: def host_get_record(self, session, host_ref): node = XendNode.instance() dom = XendDomain.instance() - record = {'name/label': node.name, - 'name/description': '', + record = {'name_label': node.name, + 'name_description': '', 'software_version': node.xen_version(), 'resident_VMs': dom.get_domain_refs(), 'host_CPUs': node.get_host_cpu_refs()} diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index bbb5192bca..604c298db5 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -549,7 +549,7 @@ class XendDomain: result = [] try: self.domains_lock.acquire() - result = [d.getVMRef() for d in self.domains] + result = [d.get_uuid() for d in self.domains.values()] finally: self.domains_lock.release() return result diff --git a/tools/python/xen/xend/XendNode.py b/tools/python/xen/xend/XendNode.py index b6612a9692..789c26cd9b 100644 --- a/tools/python/xen/xend/XendNode.py +++ b/tools/python/xen/xend/XendNode.py @@ -44,7 +44,7 @@ class XendNode: 'host': self.uuid, 'number': i, 'features': cpu_features} - self.cpus[uuid] = cpu_info + self.cpus[cpu_uuid] = cpu_info def shutdown(self): return 0 -- 2.30.2